@echo off
del /F /Q .\output\TetheringManager.apk
echo Compiling APK
java -jar "C:\Program Files (x86)\Android\android-sdk\platform-tools\apktoolgb.jar" b . .\output\unsigned.apk
echo Signing APK
jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore ../cosmo-release-key.keystore ./output/unsigned.apk cosmo
echo Aligning APK
zipalign.exe -v 4 .\output\unsigned.apk .\output\TetheringManager.apk
echo Cleaning Build Directories
rmdir /S /Q .\build
del /F /Q .\output\unsigned.apk
echo Build Complete